// 错误类型枚举
const ErrorTypes = {
  400: {
    code: 400,
    type: 'VALIDATION_ERROR',
    message: '数据验证失败'
  },
  401: {
    code: 401,
    type: 'UNAUTHORIZED',
    message: '未授权访问或者token过期'
  },
  403: {
    code: 403,
    type: 'FORBIDDEN',
    message: '禁止访问'
  },
  404: {
    code: 404,
    type: 'NOT_FOUND',
    message: '资源未找到'
  },
  409: {
    code: 409,
    type: 'CONFLICT',
    message: '资源冲突'
  },
  500: {
    code: 500,
    type: 'SERVER_ERROR',
    message: '服务器内部错误'
  }
};

module.exports = ErrorTypes